home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 120_01.zip / META4.DOC < prev    next >
Text File  |  1993-06-01  |  2KB  |  52 lines

  1.  
  2.         META4 Compiler - Compiler
  3.         -------------------------
  4.  
  5.                (c) 1981 W.A. Gale
  6.  
  7.  
  8. Transplanted to BDS C by:       Jan Larsson
  9.                 Kosterv. 12
  10.                 S-181 35 Lidingo
  11.                 SWEDEN
  12.  
  13.  
  14. These programs were published in Doctor Dobbs Journal, August 1981.
  15. They were written in PIDGIN, a low level language I didn't need and
  16. therefore did not implement (to be honest, I couldn't figure those
  17. macros out). PIDGIN to C translation is easy (the opposite would be
  18. worse) and there was few unpleasant surprises.
  19.  
  20. META40.C, META41.C and META42.C is the code for the M4 interpreter
  21. typed in as close as possible to the original code, about 4 pages
  22. in each of these 3 files. META40.H contains global declarations and
  23. META43.C some I/O routines (open file etc.).
  24.  
  25. META4.M4 is the M4 code for the META4 to M4 translator, META4.MET is
  26. the META4 source for META4 to M4 translator. 
  27.  
  28. To run the program, look here:
  29.  
  30.     A>M4 <m4_translator> <source_language> <target_language>
  31.  
  32. <m4_translator> is the translator code in m4 with extension .M4
  33. <source_language> is the input file, no default extension
  34. <target_language> is the file in which the result of translation is put
  35.  
  36. Example:
  37.           You've created a META4 descrition of your beautiful language
  38.           called XYZZY.MET, a test program written in XYZZY called
  39.           TEST.XYZ. First create a  m4 translator for your language:
  40.  
  41.           A>M4 META4 XYZZY.MET XYZZY.M4
  42.  
  43.           Now you can translate your test program:
  44.  
  45.           A>M4 XYZZY TEST.XYZ TEST.SHH
  46.  
  47.           
  48.    H A P P Y  C O M P I L I N G ! ! !
  49.  
  50.  
  51.  
  52.